/**
 * Created by Administrator on 2017/2/8 0008.
 */
import React from 'react'
export const CounterWidget = props=>{

    let {count,onIncreaseClick,onDecreaseClick} = props
    return(
        <div>
            <h1>{count}</h1>
            <button onClick={onIncreaseClick}>+</button>
            <button onClick={onDecreaseClick}>-</button>
        </div>
    )


    CounterWidget.propTypes={
        count:PropTypes.number.isRequired,
        onIncreaseClick:PropTypes.func.isRequired,
        onDecreaseClick:PropTypes.func.isRequired
    }
}